import java.security.spec.PSSParameterSpec;

public class Animal {
    public String name;

    {
        System.out.println("父类实例代码块");//1
    }
    static {
        System.out.println("父类静态代码块");//2
    }
    public Animal(String name) {
        System.out.println("父类构造方法");//3
    }
}
class Dog extends Animal {
    {
        System.out.println("子类实例代码块");//4
    }
    static {
        System.out.println("子类静态代码块");//5
    }
    public Dog(String name) {
        super("小七");
        System.out.println("子类构造方法");//6
    }

}
class T {
    public static void main(String[] args) {
        Dog dog1 = new Dog("小七");
        System.out.println("---------------------------------------------");
        Dog dog2 = new Dog("小八");

    }
}
